<?PHP
// vim: set expandtab tabstop=4 shiftwidth=4:
// +----------------------------------------------------------------------+
// | SAPID CMS                               		  					  |
// +----------------------------------------------------------------------+
// | Author:  Dmitry Sheiko (www.cmsdevelopment.com)	                  |
// | Copyright (c) 2004 Dmitry Sheiko	                                  |
// | http://sapid.sourceforge.net	                                      |
// +----------------------------------------------------------------------+
// | This source file is free software; you can redistribute it and/or    |
// | modify it under the terms of the GNU Lesser General Public           |
// | License as published by the Free Software Foundation; either         |
// | version 2.1 of the License, or (at your option) any later version.   |
// |                                                                      |
// | This source file is distributed in the hope that it will be useful,  |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    |
// | Lesser General Public License for more details.                      |
// +----------------------------------------------------------------------+
// Release: 08.11.04 (dd/mm/yy)
// $Id: metapanel.inc.php,v 1.2 2005/06/14 13:39:43 mephius Exp $

$close = '<img src="'.$http_path.'usr/system/images/close.gif"  width="12" height="14" style="float: right" alt="'.$lang["Close"].'" border="0" />';

$metapanel = '<!-- Meta-panel  -->
<div id="meta" style="z-index : auto; position : absolute; left : 50px; top : 260px; width: 400px; padding: 5px 5px 5px 5px; background-color: #CEE4F2; font-family: Tahoma, Arial; font-size: 11px; border: solid #5DB1EF 1px; display: none">
<a style="cursor: pointer;" onclick="meta.style.display=\'none\';" >'.$close.'</a>
<p align="center"><b>'.$lang["DocMetaData"].'</b></p>
<p align="left"><i></i></p>
<form style="padding: 0px; margin: 0px;">
<table height="100%" width="100%" cellpadding="0" cellspacing="0" style="font-family: Tahoma, Arial; font-size: 11px;">
	<tr>
		<td>
		'.$lang["META-TITLE"].'
		</td>
		<td>
			<input type="TEXT" style="width: 300px" name="metatitle" id="string_metatitle" value="'.$env["page.metatitle"].'" />
		</td>
	</tr>

	<tr>
		<td>
		'.$lang["META-DESCRIPTION"].'
		</td>
		<td>
			<textarea style="width: 300px" row="2" name="metadescription"  id="string_metadescription">'.$env["page.metadescription"].'</textarea>
		</td>
	</tr>
	<tr>
		<td>
		'.$lang["META-KEYWORDS"].'
		</td>
		<td>
			<textarea style="width: 300px" row="2" name="metakeywords" id="string_metakeywords">'.$env["page.metakeywords"].'</textarea>
		</td>
	</tr>

	<tr>
		<td colspan="2" align="center" style="padding: 10px 5px 5px 5px">';

if($env["page.metatitle"])
$metapanel .= '
		<input type="button" onclick="window.open(\''.$http_path.'usr/system/seo_analizer.php?paction=seoanalizer&template='.$env["page"]["TEMPLATE"].'&docid='.$env["page"]["ID"].'&metatitle=\'+this.form.metatitle.value+\'&metadescription\', \'analizer\', \'width=640, height=450, status=no,toolbar=no, menubar=no, scrollbars=yes, resizable=yes\');" class="sapidcms_cont_btn" name="insertexp" value="'.$lang["SEOAnalize"].'">';

$metapanel .= '
		<input type="button" onclick="meta.style.display=\'none\'; " class="sapidcms_cont_btn" name="insertexp" value="'.$lang["Hide"].'">
		</td>
	</tr>

</table>
</form>
</div>';

//$name = "metatitle"; $GLOBALS["form_fields"].='<input type="hidden" name="container[qc]['.$name.']" value="'.$name.'"><input type="hidden" name="'.$name.'" id="field_'.$name.'">';
$name = "metadescription"; $GLOBALS["form_fields"].='<input type="hidden" name="container[qc]['.$name.']" value="'.$name.'"><input type="hidden" name="'.$name.'" id="field_'.$name.'">';
$name = "metakeywords"; $GLOBALS["form_fields"].='<input type="hidden" name="container[qc]['.$name.']" value="'.$name.'"><input type="hidden" name="'.$name.'" id="field_'.$name.'">';

//$GLOBALS["action_script"].="document.getElementById('field_metatitle').value = document.getElementById('string_metatitle').value;\n";
$GLOBALS["action_script"].="document.getElementById('field_metadescription').value = document.getElementById('string_metadescription').value;\n";
$GLOBALS["action_script"].="document.getElementById('field_metakeywords').value = document.getElementById('string_metakeywords').value;\n";
?>